-
-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Globe covering tiles optimization #4937
Globe covering tiles optimization #4937
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4937 +/- ##
==========================================
- Coverage 89.13% 89.08% -0.06%
==========================================
Files 267 269 +2
Lines 38234 38268 +34
Branches 2347 2356 +9
==========================================
+ Hits 34081 34090 +9
- Misses 3151 3174 +23
- Partials 1002 1004 +2 ☔ View full report in Codecov by Sentry. |
The following PR is nearing its merge: If you need, I can create a branch in this repo for collaboration, so you could open this PR against the updates made in the above PR, but otherwise, I prefer to have the above PR merged first to avoid conflicts on the hard work @NathanMOlson did. |
Lets wait for #4779 to be merged first. |
@kubapelc , does this affect tile loading of the globe when the terrain3d is active too? |
It should not, this PR does not change functionality of tile culling, just makes it faster. But globe coveringTiles so far assumes that there is no terrain and does not take tile min/max elevation into account when generating AABBs. I think it should not be an issue for the purposes of porting terrain to globe. I'd like to redo globe coveringTiles to not use AABBs, since they do not approximate tiles on a sphere very well, and use oriented bounding boxes instead. I would add support for tile min/max elevation along with this. |
Converting tiles have been merged, this can now proceed. |
…/globe-coveringtiles-opt
# Conflicts: # src/geo/projection/globe_covering_tiles.test.ts # src/geo/projection/globe_covering_tiles.ts # src/geo/projection/globe_transform.ts
Can you add some tests and a changelog entry? |
I've added both. Most of the changes were already covered by existing tests, I've added tests for aabb-plane intersection and for the aabb cache. |
…ringtiles-opt # Conflicts: # CHANGELOG.md
This looks straight forward and good, thanks! |
Improves the performance of globe's
coveringTiles
function, adds benchmarks to measure globecoveringTiles
performance, also likely slightly improves mercator'scoveringTiles
performance (not measured, but some of the changes should help there too).Improvements:
Performance
There are two benchmarks, one with the camera looking at the globe from above, one with a pitched camera. The camera slowly pans to the east during the benchmark. Here are the rough contributions of individual changes: